// house_pkg/pages/room/index.ts
Page({
  data: {
    street: '',
    building: '',
    rooms: []
  },

  onLoad(options) {
    console.log('选择房间页面', options)
    this.fake(options, 3, 2)
  },

  fake(options, floorNum, roomNum) {
    // const rooms = [101,102,201,201]
    const rooms = []
    for (let i = 0; i < floorNum; i++) {
      for (let j = 0; j < roomNum; j++) {
        rooms.push((i + 1) + '0' + (j + 1))
      }
    }
    console.log('rooms', rooms)
    // 设置页面数据
    this.setData({
      street: options.street,
      building: options.building,
      rooms: rooms
    })
  }
})